import 'package:flutter/material.dart';

class DrawerDemo extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return  Drawer(
        child: ListView(
        padding: EdgeInsets.zero,
        children: <Widget>[
//                 DrawerHeader(
//                   child: Text('header'.toUpperCase()),
//                   decoration: BoxDecoration(),
//
//                 ),
        UserAccountsDrawerHeader(
        accountName: Text('王松锋'),
        accountEmail: Text('349510052@qq.com',),
        currentAccountPicture: CircleAvatar(
        backgroundImage: NetworkImage('https://img01.sogoucdn.com/app/a/100520021/da4683c8ffaeea698808d058053f7e41'),
        ),
        decoration: BoxDecoration(
           color: Colors.yellow[400],
           image: DecorationImage(
              image: NetworkImage('https://img04.sogoucdn.com/app/a/100520021/29f7accbef82481e26f045369369608d'),
              fit: BoxFit.cover,
              colorFilter: ColorFilter.mode(Colors.yellow[400].withOpacity(0.6), BlendMode.darken)
           ),


        ),
       ),

        ListTile(
           title: Text('消息',textAlign: TextAlign.right,),
           trailing: Icon(Icons.message),
           onTap: () => Navigator.pop(context),
        ),
        ListTile(
           title: Text('商城',textAlign: TextAlign.right,),
           trailing: Icon(Icons.shop),
              onTap: () => Navigator.pop(context),
           ),
        ListTile(
          title: Text('个人信息',textAlign: TextAlign.right,),
          trailing: Icon(Icons.person),
          onTap: () => Navigator.pop(context),
        )
     ],
    ),
    );
  }
}